﻿
// =================================================================== 
// 项目说明
//====================================================================
// Wup。@Copy Right 2014
// 文件： user1.cs
// 项目名称：买车网
// 创建时间：2014/12/23
// 负责人：Wup
// ===================================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using Weixin.Entity.ChinaTax;
using Weixin.Utils;


namespace Weixin.DAL.ChinaTax
{
    /// <summary>
    /// 数据层实例化接口类 dbo.user1.
    /// </summary>
    public partial class user1DataAccessLayer 
    {
        public int Register(string email, string mobile, string password, string recommandUser, string IP)
        {
            SqlParameter[] para ={
                                new SqlParameter("@Email",SqlDbType.VarChar,50),
                                new SqlParameter("@Mobile",SqlDbType.VarChar,11),
                                new SqlParameter("@Password",SqlDbType.VarChar,20),
                                new SqlParameter("@RecommandUser",SqlDbType.VarChar,50),
                                new SqlParameter("@ClientIP",SqlDbType.VarChar,20),
                                new SqlParameter("@rtn",SqlDbType.Int)
                                 };
            para[0].Value = email;
            para[1].Value = mobile;
            para[2].Value = password;
            para[3].Value = recommandUser;
            para[4].Value = IP;
            para[5].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteNonQuery(WebConfig.ChinaTax, CommandType.StoredProcedure, "p_Register", para);
            if (para[5].Value != "")
            {
                return int.Parse(para[5].Value.ToString());
            }

            return 0;
        }
	}
}
